<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateAppFileUploadTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('file_upload', function(Blueprint $table)
		{
			$table->integer('id', true);
			$table->string('name')->comment('文件名称');
			$table->string('path')->comment('文件相对路径');
			$table->string('type', 20)->comment('文件类型');
			$table->integer('size')->comment('文件大小');
			$table->string('ext', 10)->comment('文件后缀');
			$table->string('hash', 32)->comment('文件hash');
			$table->dateTime('create_time')->nullable();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('app_file_upload');
	}

}
